import http from "./http";

export function login(payload) {
  return http.post("/auth/login", {
    type: "password",
    credentials: payload
  });
}

export function refreshToken(refreshToken) {
  return http.post("/auth/refresh", { refreshToken });
}

export function logout() {
  return http.post("/auth/logout");
}

export function register(payload) {
  return http.post("/auth/register", payload);
}

export function sendSmsCode(payload) {
  return http.post("/auth/sms/send", payload);
}

export function getPartialStatus() {
  return http.get("/auth/partial/status");
}

export function getCompanyVerification() {
  return http.get("/auth/verification/company");
}

export function saveCompanyVerification(payload) {
  return http.post("/auth/verification/company", payload);
}
